

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>ceph-osd -- ceph 对象存储守护进程 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/doctools.js"></script>
        <script src="../../../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex/" />
    <link rel="search" title="Search" href="../../../search/" />
    <link rel="next" title="ceph-kvstore-tool -- ceph 的 kvstore 操作工具" href="../ceph-kvstore-tool/" />
    <link rel="prev" title="ceph-mon -- ceph 监视器守护进程" href="../ceph-mon/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../../" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../../../rados/">Ceph 存储集群</a></li>
          <li class="breadcrumb-item"><a href="../../../rados/man/">对象存储手册页</a></li>
      <li class="breadcrumb-item active">ceph-osd -- ceph 对象存储守护进程</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../../_sources/man/8/ceph-osd.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../../rados/">Ceph 存储集群</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../../rados/configuration/">配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../rados/operations/">运维</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../../../rados/man/">    手册页</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../ceph-volume/">ceph-volume -- Ceph OSD 部署和检查工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-volume-systemd/">ceph-volume-systemd -- systemd ceph-volume 辅助工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph/">ceph -- Ceph 管理工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-authtool/">ceph-authtool -- ceph 密钥环操作工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-clsinfo/">ceph-clsinfo -- 查看类对象信息</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-conf/">ceph-conf -- ceph 配置文件工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-debugpack/">ceph-debugpack -- ceph 调试信息打包工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-dencoder/">ceph-dencoder -- ceph 编码器/解码器工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-mon/">ceph-mon -- ceph 监视器守护进程</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">ceph-osd -- ceph 对象存储守护进程</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id1">提纲</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id2">描述</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id3">选项</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id4">使用范围</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id5">参考</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-kvstore-tool/">ceph-kvstore-tool -- ceph 的 kvstore 操作工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-run/">ceph-run -- 发生核心转储后重启守护进程</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-syn/">ceph-syn -- ceph 的人造负载生成器</a></li>
<li class="toctree-l3"><a class="reference internal" href="../crushdiff/">crushdiff -- ceph crush 图测试工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../crushtool/">crushtool -- CRUSH 图操作工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../librados-config/">librados-config -- 显示关于 librados 的信息</a></li>
<li class="toctree-l3"><a class="reference internal" href="../monmaptool/">monmaptool -- ceph 监视器运行图操作工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../osdmaptool/">osdmaptool -- ceph osd 运行图操作工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../rados/">rados -- rados 对象存储工具</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-post-file/">ceph-post-file -- 把文件上传给 ceph 开发者</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../rados/troubleshooting/">故障排除</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../rados/api/">APIs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="ceph-osd-ceph">
<span id="ceph-osd-daemon"></span><h1>ceph-osd -- ceph 对象存储守护进程<a class="headerlink" href="#ceph-osd-ceph" title="Permalink to this heading"></a></h1>
<section id="id1">
<h2>提纲<a class="headerlink" href="#id1" title="Permalink to this heading"></a></h2>
<div class="line-block">
<div class="line"><strong>ceph-osd</strong> -i <em>osdnum</em> [ --osd-data <em>datapath</em> ] [ --osd-journal
<em>journal</em> ] [ --mkfs ] [ --mkjournal ] [--flush-journal] [--check-allows-journal] [--check-wants-journal] [--check-needs-journal] [ --mkkey ] [ --osdspec-affinity ]</div>
</div>
</section>
<section id="id2">
<h2>描述<a class="headerlink" href="#id2" title="Permalink to this heading"></a></h2>
<p><strong>ceph-osd</strong> 是 Ceph 分布式文件系统的对象存储守护进程。
它负责把对象存储到本地文件系统，
并使之通过网络可访问。</p>
<p><em>datapath</em> 参数应该是 xfs 文件系统上保存对象数据的一个目录。日志是可选的，
只有它位于非数据盘的低延时设备上
（理想中应该是 NVRAM ）时才会达到最佳性能。</p>
</section>
<section id="id3">
<h2>选项<a class="headerlink" href="#id3" title="Permalink to this heading"></a></h2>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-f">
<span id="cmdoption-ceph-osd-foreground"></span><span class="sig-name descname"><span class="pre">-f</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--foreground</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-f" title="Permalink to this definition"></a></dt>
<dd><p>前台：启动后不要作为守护进程，仍在前台运行。不要生成 PID 文件。通过 <a class="reference internal" href="../ceph-run/"><span class="doc">ceph-run</span></a>(8) 运行时此选项有用。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-d">
<span class="sig-name descname"><span class="pre">-d</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-d" title="Permalink to this definition"></a></dt>
<dd><p>调试模式：类似 <code class="docutils literal notranslate"><span class="pre">-f</span></code> ，还会把所有日志发到了标准错误。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-setuser">
<span class="sig-name descname"><span class="pre">--setuser</span></span><span class="sig-prename descclassname"> <span class="pre">userorgid</span></span><a class="headerlink" href="#cmdoption-ceph-osd-setuser" title="Permalink to this definition"></a></dt>
<dd><p>启动后设置 UID 。如果指定的是用户名，
会查询用户记录以获取 UID 及其 GID ，同时设置 GID ，
除非还指定了 --setgroup 选项。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-setgroup">
<span class="sig-name descname"><span class="pre">--setgroup</span></span><span class="sig-prename descclassname"> <span class="pre">grouporgid</span></span><a class="headerlink" href="#cmdoption-ceph-osd-setgroup" title="Permalink to this definition"></a></dt>
<dd><p>启动后设置 GID 。如果指定的是组名，
会查询组记录以获取 GID 。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-osd-data">
<span class="sig-name descname"><span class="pre">--osd-data</span></span><span class="sig-prename descclassname"> <span class="pre">osddata</span></span><a class="headerlink" href="#cmdoption-ceph-osd-osd-data" title="Permalink to this definition"></a></dt>
<dd><p>把对象存储在 <em>osddata</em> 。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-osd-journal">
<span class="sig-name descname"><span class="pre">--osd-journal</span></span><span class="sig-prename descclassname"> <span class="pre">journal</span></span><a class="headerlink" href="#cmdoption-ceph-osd-osd-journal" title="Permalink to this definition"></a></dt>
<dd><p>把日志更新到 <em>journal</em> 。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-check-wants-journal">
<span class="sig-name descname"><span class="pre">--check-wants-journal</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-check-wants-journal" title="Permalink to this definition"></a></dt>
<dd><p>检查下是否需要日志。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-check-allows-journal">
<span class="sig-name descname"><span class="pre">--check-allows-journal</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-check-allows-journal" title="Permalink to this definition"></a></dt>
<dd><p>检查是否允许启用日志。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-check-needs-journal">
<span class="sig-name descname"><span class="pre">--check-needs-journal</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-check-needs-journal" title="Permalink to this definition"></a></dt>
<dd><p>检查日志是否是必需的。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-mkfs">
<span class="sig-name descname"><span class="pre">--mkfs</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-mkfs" title="Permalink to this definition"></a></dt>
<dd><p>创建空的对象仓库。如果定义了日志，
也同时初始化。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-mkkey">
<span class="sig-name descname"><span class="pre">--mkkey</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-mkkey" title="Permalink to this definition"></a></dt>
<dd><p>生成新的私钥。通常和 <code class="docutils literal notranslate"><span class="pre">--mkfs</span></code> 一起使用，
因为与 <a class="reference internal" href="../ceph-authtool/"><span class="doc">ceph-authtool</span></a>(8)
生成密钥相比此选项更便捷。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-mkjournal">
<span class="sig-name descname"><span class="pre">--mkjournal</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-mkjournal" title="Permalink to this definition"></a></dt>
<dd><p>创建适用于已有对象仓库的新日志文件。
常用于因硬盘或文件系统故障时导致的日志设备或文件损坏。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-flush-journal">
<span class="sig-name descname"><span class="pre">--flush-journal</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-flush-journal" title="Permalink to this definition"></a></dt>
<dd><p>把日志刷回永久存储，它运行于前台，
这样你就能知道它何时完成。
适用于你想调整日志尺寸或以其他方式销毁它时：
此功能可保证不丢数据。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-get-cluster-fsid">
<span class="sig-name descname"><span class="pre">--get-cluster-fsid</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-get-cluster-fsid" title="Permalink to this definition"></a></dt>
<dd><p>打印集群的 fsid (uuid) 然后退出。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-get-osd-fsid">
<span class="sig-name descname"><span class="pre">--get-osd-fsid</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-get-osd-fsid" title="Permalink to this definition"></a></dt>
<dd><p>打印 OSD 的 fsid 然后退出。
OSD 的 UUID 是在创建文件系统（ --mkfs ）时生成的，
而且对这个特定的 OSD 例程来说是惟一的。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-get-journal-fsid">
<span class="sig-name descname"><span class="pre">--get-journal-fsid</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-get-journal-fsid" title="Permalink to this definition"></a></dt>
<dd><p>打印日志的 UUID 。在新建文件系统（ --mkfs ）时设置了日志 fsid 以与 OSD 相配。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-c">
<span id="cmdoption-ceph-osd-conf"></span><span class="sig-name descname"><span class="pre">-c</span></span><span class="sig-prename descclassname"> <span class="pre">ceph.conf</span></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--conf</span></span><span class="sig-prename descclassname"><span class="pre">=ceph.conf</span></span><a class="headerlink" href="#cmdoption-ceph-osd-c" title="Permalink to this definition"></a></dt>
<dd><p>用 <em>ceph.conf</em> 配置文件而非默认的 <code class="docutils literal notranslate"><span class="pre">/etc/ceph/ceph.conf</span></code>
来确定运行时配置。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-m">
<span class="sig-name descname"><span class="pre">-m</span></span><span class="sig-prename descclassname"> <span class="pre">monaddress[:port]</span></span><a class="headerlink" href="#cmdoption-ceph-osd-m" title="Permalink to this definition"></a></dt>
<dd><p>连接到指定监视器（而非到 <code class="docutils literal notranslate"><span class="pre">ceph.conf</span></code> 里找）。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-ceph-osd-osdspec-affinity">
<span class="sig-name descname"><span class="pre">--osdspec-affinity</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-ceph-osd-osdspec-affinity" title="Permalink to this definition"></a></dt>
<dd><p>设置某个 OSDSpec 的亲和性。
这个选项只能与 --mkfs 一起使用。</p>
</dd></dl>

</section>
<section id="id4">
<h2>使用范围<a class="headerlink" href="#id4" title="Permalink to this heading"></a></h2>
<p><strong>ceph-osd</strong> 是 Ceph 的一部分，这是个伸缩力强、开源、
分布式的存储系统，更多信息参见 <a class="reference external" href="https://docs.ceph.com">https://docs.ceph.com</a> 。</p>
</section>
<section id="id5">
<h2>参考<a class="headerlink" href="#id5" title="Permalink to this heading"></a></h2>
<p><a class="reference internal" href="../ceph/"><span class="doc">ceph</span></a>(8),
<a class="reference internal" href="../ceph-mds/"><span class="doc">ceph-mds</span></a>(8),
<a class="reference internal" href="../ceph-mon/"><span class="doc">ceph-mon</span></a>(8),
<a class="reference internal" href="../ceph-authtool/"><span class="doc">ceph-authtool</span></a>(8)</p>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../ceph-mon/" class="btn btn-neutral float-left" title="ceph-mon -- ceph 监视器守护进程" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../ceph-kvstore-tool/" class="btn btn-neutral float-right" title="ceph-kvstore-tool -- ceph 的 kvstore 操作工具" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>